package pl.put.augrelshooter.activities;

import pl.put.augrelshooter.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.TextView;

public class DialogActivity extends Activity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.activity_dialog);
        
        if (getIntent().getExtras().getInt("won") == 1) {
        	TextView text = (TextView) findViewById(R.id.finish_text);
        	text.setText("WINNER");
        }
    }

    public void finishDialog(View v) {
    	Intent intent = new Intent(DialogActivity.this, MainActivity.class);
        startActivity(intent);
        DialogActivity.this.finish();
    }
}
